package malus.shaofeng.com.beiwomusic.activity;

import android.support.v7.app.ActionBarActivity;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.TextView;

import malus.shaofeng.com.beiwomusic.R;

public class BaseActivity extends ActionBarActivity {

    private TextView view;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

    }

    @Override
    public void setContentView(int layoutResID) {
        super.setContentView(layoutResID);

        view = (TextView)findViewById(R.id.common_title);

    }

    @Override
    public void setTitle(CharSequence title) {
        if (view!=null){
            view.setText(title);
        }else {
            super.setTitle(title);
        }
    }
}
